package com.hos.punchtheclocksystem.service;

import com.hos.punchtheclocksystem.mapper.Card001Mapper;
import com.hos.punchtheclocksystem.pojo.Card001;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author: ycc
 * @Date: 2021/9/15 13:02
 */

@Service
public class Card001Service {
    @Resource
    Card001Mapper mapper;

    public Card001 getById(Integer id){
        return mapper.selectById1(id);
    }

    //删除
    public void delete(Integer[] ids){
        mapper.deletes(ids);
    }

    public Card001 get(Integer id){
        return mapper.selectById(id);
    }

    public int count(Map<String, Object> param) {
        return mapper.count(param);
    }

    public List<Card001> getPageResult(Map<String, Object> param) {
        return mapper.selectPageResult(param);
    }


    //修改
    /* Integer workerId, String name, Integer bodyState, Integer heathCodeState, Integer inDangerousPlace, Double temperatureToday, String addressOfHome, Long phoneNumber, String extend,Integer id*/
    public void updateCard001(Card001 card001) {
        mapper.updateKK(card001);
    }


    public Card001 selectCardToday(Integer worker_id){
        return mapper.selectCardToday(worker_id);
    }

}
